<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
    <style media="screen">
        * {
            margin: 0;
            padding: 0;
        }
        
        #clock {
            width: 600px;
            height: 600px;
            border: 4px solid lightgray;
            margin: auto;
            position: relative;
            border-radius: 50%;
        }
        
        #scale {
            width: 20px;
            height: 100%;
            position: absolute;
            left: 50%;
            margin-left: -10px;
            /*background: green;*/
        }
        
        #point {
            width: 4px;
            height: 10px;
            background: lightgray;
            margin: auto;
        }
        
        #number {
            width: 20px;
            height: 20px;
            margin-top: 5px;
            /*background: red;*/
            font-size: 20px;
            text-align: center;
            line-height: 20px;
        }
        
        #hour {
            width: 12px;
            height: 180px;
            background: red;
            border-radius: 6px;
            transform-origin: 50% 150px;
            position: absolute;
            top: 150px;
            left: 50%;
            margin-left: -6px;
        }
        
        #minute {
            width: 8px;
            height: 250px;
            background: orange;
            position: absolute;
            border-radius: 4px;
            transform-origin: 50% 200px;
            top: 100px;
            left: 50%;
            margin-left: -4px;
        }
        
        #second {
            width: 4px;
            height: 360px;
            background: red;
            border-radius: 2px;
            position: absolute;
            top: 0;
            left: 50%;
            margin-left: -2px;
            transform-origin: 50% 300px;
            z-index: 100;
        }

    </style>
</head>

<body>
    <div id="clock">
        <div id="hour">

        </div>
        <div id="minute">

        </div>
        <div id="second">

        </div>
    </div>
</body>
<script type="text/javascript">
    var clock = document.getElementById('clock');
    var hour = document.getElementById('hour');
    var minute = document.getElementById('minute');
    var second = document.getElementById('second');

    function surface() {
        var currentDate = new Date();
        var hours = currentDate.getHours();
        var minutes = currentDate.getMinutes();
        var seconds = currentDate.getSeconds();

        seconds = hours * 3600 + minutes * 60 + seconds;

        hour.style.transform = 'rotate(' + seconds / 120 + 'deg)';
        minute.style.transform = 'rotate(' + seconds * 0.1 + 'deg)';
        second.style.transform = 'rotate(' + seconds * 6 + 'deg)';

    }
    setInterval('surface()', 1000);

    for (var i = 1; i < 61; i++) {
        var scale = document.createElement('div');
        scale.id

        = 'scale';
        scale.style.transform = 'rotate(' + i * 6 + 'deg)';
        clock.appendChild(scale);

        var point = document.createElement('div');
        point.id

        = 'point';
        scale.appendChild(point);

        var number = document.createElement('div');
        number.id

        = 'number';
        number.style.transform = 'rotate(-' + i * 6 + 'deg)'
        if (i % 5 == 0) {
            number.innerHTML = i / 5;
            point.style.height = '15px';
        }
        scale.appendChild(number);
    }

</script>

</html>
